<template>
  <a-locale-provider :locale="locale">
    <router-view></router-view>
  </a-locale-provider>
</template>

<script>
  import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
  export default {
    data() {
      return {
        theme: this.$store.state.app.theme,
        locale: zhCN
      };
    },
    beforeDestroy() {

    },
    methods: {
      initView() {
        $(window).resize(() => {
          let sWidth = $(window).width();
          if (sWidth > 1440) {
            $("html body").css({zoom: 1, '-moz-transform': 'scale(' + 1 + ')'});
          } else {
            $("html body").css({zoom: 1, '-moz-transform': 'scale(' + 1 + ')'});
          }
        });
      }
    },
    mounted() {
      localStorage.removeItem('pageOpenedList');
      this.$Notice.config({
        top: 100
      });
      this.initView();
      let sWidth = $(window).width();
      if (sWidth > 1440) {
        $("html body").css({zoom: 1, '-moz-transform': 'scale(' + 1 + ')'});
      } else {
        $("html body").css({zoom: 1, '-moz-transform': 'scale(' + 1 + ')'});
      }
    }
  };
</script>

<style>
  .app-main {
    width: 100%;
    height: 100%;
  }
</style>
